Fix for makeClipping/undoClipping issue#63
Open
victor-homyakov wants to merge 1 commit intoprototypejs:masterfrom
Open
Fix for makeClipping/undoClipping issue#63victor-homyakov wants to merge 1 commit intoprototypejs:masterfrom
victor-homyakov wants to merge 1 commit intoprototypejs:masterfrom
Conversation
I've made earlier pull request with failing unit test for issue #1063 with `Element#makeClipping()`/`Element#undoClipping()`. Here is a patch for this issue. It deals with exact value of `element.style`, not with computed `Element#getStyle()`.
Collaborator
There was a problem hiding this comment.
Shouldn't this be if (!Object.isString(madeClipping))? If it's a string, it means we've already made this element clip, and so we're doing extra work for no reason.
Collaborator
There was a problem hiding this comment.
Also, do you need to change these conditionals at all? I might be missing something, but won't it suffice to do var overflow = element.style.overflow || '' like you did in the line below?
Contributor
Author
There was a problem hiding this comment.
Yes, you are absolutely correct, I've somehow missed negation in if (!Object.isString(madeClipping)).
And yes again, unchanged if (Object.isUndefined(madeClipping)) should work. I've made here isString() just for symmetry with check at line 1427: if (Object.isString(overflow)).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've made earlier pull request with failing unit test for issue #1063 with
Element#makeClipping()/Element#undoClipping(). Here is a patch for this issue. It deals with exact value ofelement.style, not with computedElement#getStyle().